﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Xmobile.BO.Apps;

namespace Xmobile.Ajax
{
    public partial class applist : System.Web.UI.Page
    {
        int CatID = 0;
        int PageIndex = 2;
        int PageSize = 28;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["cat_id"] != null && Request.QueryString["cat_id"].ToString() != "")
            {
                CatID = Convert.ToInt32(Request.QueryString["cat_id"]);
            }
            

            if (Request.QueryString["pageindex"] != null && Request.QueryString["pageindex"].ToString() != "")
            {
                PageIndex = Convert.ToInt32(Request.QueryString["pageindex"]);
            }

          
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            DataTable dt = new DataTable();
            dt = AppsBO.Apps_Select_List_Padding(CatID, PageIndex, PageSize);
            repList.DataSource = dt;
            repList.DataBind();
        }
    }
}